package com.yiyi.config;

/**
 * User: YIYI
 * Date: 2021-08-10
 * Time: 16:54
 * Description:
 */

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;


/**
 * User: YIYI
 * Date: 2021-08-09
 * Time: 15:18
 * Description:Jwt配置属性类
 */

@Component
@ConfigurationProperties(prefix = "jwt") //读取配置文件以 "jwt" 前缀的配置信息。
public class JwtConfigProperties {

    private long expire;
    private String secret;

    public JwtConfigProperties() {
    }

    public JwtConfigProperties(long expire, String secret) {
        this.expire = expire;
        this.secret = secret;
    }

    public long getExpire() {
        return expire;
    }

    public void setExpire(long expire) {
        this.expire = expire;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    @Override
    public String toString() {
        return "JwtConfigProperties{" +
                "expire=" + expire +
                ", secret='" + secret + '\'' +
                '}';
    }
}